/**
 * ===========================================
 * Project: qb-common
 * ===========================================
 * Package: com.cyou.qb.common.service
 * 
 * Copyright (c) 2012, CYOU All Rights Reserved.
 * ===========================================
 */
package com.cyou.qb.common.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.cyou.qb.common.domain.AssignedWinner;
import com.cyou.qb.common.domain.Award;
import com.cyou.qb.service.BaseService;

/**
 * <p>AwardConfigChance</p>
 * <p>
 * Description:配置中奖方式service
 * </p>
 *
 * @author lidongwei
 * @version 
 * @since 2012-10-11
 */

public interface AwardConfigChanceService extends BaseService {
	
	/**
	 * 根据奖品id获取指定中奖用户
	 * Description
	 * @author lidongwei
	 * @since 2012-10-30
	 */

	public List<AssignedWinner> findAssignedWinnerListByAwardId(String awardId);

	/**
	 * Description 删除一个指定用户
	 * @author lidongwei
	 * @throws Exception 
	 * @since 2012-10-11
	 */
	public void removeOneAssignWinner(String assignedWinnerId) throws Exception;

	/**
	 * Description 保存一个指定用户
	 * @author lidongwei
	 * @return 
	 * @throws Exception 
	 * @since 2012-10-11
	 */
	public AssignedWinner saveOneAssignWinner(String awardId, String passport, String num) throws Exception;

	/**
	 * Description 保存奖品中奖方式
	 * @author lidongwei
	 * @throws Exception 
	 * @since 2012-10-11
	 */
	public void saveAwardConfigChance(String awardId, String probabilityCheckBox, String prizeRadio,
			String prizeTimeInput, String prizeNumInput) throws Exception;

	/**
	 * Description 根据奖品id获取用户passport
	 * @author lidongwei
	 * @since 2012-10-11
	 */
	public boolean findPassport(String passport, String awardId);

	/**
	 * 
	 *
	 * <p>指定中奖用户查询</p>
	 * 根据活动ID和用户中心ID查询指定用户表<br/>
	 * 返回指定用户列表
	 * @author zoudongchao
	 * @param activeId 活动ID
	 * @param passport 用户通行证
	 * @return
	 */
	public List<AssignedWinner> findAssignedWinner(int activeId, String passport);

	/**
	 * <p>减少指定用户中奖次数</p>
	 * 减少1
	 * @author zoudongchao
	 */
	public void updateAssignedWinnerDrawTimes(int activeId, int awardId, String passport);

	/**
	 * 查找出所有有效地指定用户中奖
	 * @return
	 */
	public List<AssignedWinner> findAllValidAssignedWinner();

}
